package com.guomao.mapper;

import com.guomao.entity.Class;
import org.apache.ibatis.annotations.*;

public interface ClassMapper {


    @Select(value = "select * from class where cid = #{id}")
    @ResultType(Class.class)
    public Class getClassById(Integer id);


    //    @Insert(value = "")
    @Insert("insert into class values (null,#{cname})")
    public int insertClass(Class c);

    @Update("update class set cname = #{cname} where cid = #{cid}")
    public int updateClass(Class c);

    @Delete("delete from class where cid = #{cid}")
    public int deleteClass(Integer cid);
}
